home *** CD-ROM | disk | FTP | other *** search
-
-
- How To Use PCX2BGI Images In Turbo Pascal Programs
- By Marty Balash, Waterbury CT
-
- Draw your images using a paint program such as Deluxe Paint or
- PC-Paintbrush, which save in .LBM or .PCX format. If you use another paint
- program, find a commercial or shareware conversion program that will
- convert to .LBM or .PCX - there are many available. Use the 640x349
- 16-color mode of your paint program.
- Following the instructions in PCX2BGI.DOC, use PCX2BGI.EXE to
- load your picture and select a "Partial Screen" type of image save. With
- your picture displayed on the screen, frame and save the sections of the
- picture you would like to use in your program.
- At this point you will have one or more .MJB files in your current
- directory. For each of these files run the Turbo Pascal conversion
- program for each of your .MJB files.
- * Example:
- * TPCONV mypic.mjb <Enter>
- *
- * Sample screen output:
- * TPCONV - By Marty Balash
- * Prepare Header And BGI Data For Turbo Pascal
- *
- * Header File "MYPIC.HDR" Created.
- *
- * BGI Data File "MYPIC.DAT" Created.
- *
- * Array Size For TP Program Is: 7702
-
- The example above produces two files: mypic.hdr and mypic.dat,
- leaving the original file (mypic.mjb) untouched. The .HDR and .DAT
- files will be read directly by your Turbo Pascal program. The array
- size is important to note. For this reason, you my want to redirect
- the screen output of TPCONV.EXE to your printer...
- * Example:
- * TPCONV mypic.mjb >prn <Enter>
- This is generally a good idea, especially when working with more than
- one image file.
-
- The layout if the header is:
- * type imagehdr = record
- * id : array [1..8] of char; {id - This should be 'PCX2BGI'}
- * size : word; {size - For TC programs (not needed)}
- * palette : palettetype; {palette - Use SetAllPalette to set}
- * end;
- The only thing you really need from the header when using Turbo Pascal is
- the palette.
- If you are using a group of images from the same picture, you will only
- need to read one of the .HDR files created by TPCONV. You can get rid
- of the rest.
- In order to use each of the .DAT image files created by TPCONV, you will
- need to hard-code an array of the correct size for each one. TPCONV
- reports the size you will need for a given image ( "Array Size For TP
- Program Is: ... ").
- The commented demo source file "TPDEMO1.PAS" will read a single image
- from disk and put it on the screen. "TPDEMO2.PAS" will read multiple
- images from disk and animate them on the screen.
-
- If you find these utilities useful, please mail $15.00 to:
- Marty Balash
- 2 Pinecrest Dr.
- Prospect CT 06712
-
- Files in .ZIP file for Turbo Pascal programmers:
- BGI1 DAT Image used by TPDEMO1.PAS & TPDEMO2.PAS
- BGI2 DAT Image used in TPDEMO2.PAS
- BGI3 DAT Image used in TPDEMO2.PAS
- BGI4 DAT Image used in TPDEMO2.PAS
- BGI5 DAT Image used in TPDEMO2.PAS
- BGI6 DAT Image used in TPDEMO2.PAS
- BGI7 DAT Image used in TPDEMO2.PAS
- BGI8 DAT Image used in TPDEMO2.PAS
- TP DOC Documentation for Turbo Pascal programmers
- TPCONV EXE Conversion program needed by Turbo Pascal programmers
- TPDEMO2 EXE Executable Demo
- BGI1 HDR Header used by TPDEMO1.PAS & TPDEMO2.PAS
- TPDEMO1 PAS Source to read and display a single image
- TPDEMO2 PAS Source to read and animate multiple images
- DEMO PCX The picture that the BGI?.DAT files created with
-
- * END OF FILE *
-